-
Notifications
You must be signed in to change notification settings - Fork 121
REST API: Migrate site settings endpoints #8638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You can test the changes from this Pull Request by:
|
jaclync
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected 👍 just had a question about the way it checks if it should skip fetching site plan
| let sitePlanAction = AccountAction.synchronizeSitePlan(siteID: siteID) { result in | ||
| if case let .failure(error) = result { | ||
| errors.append(error) | ||
| /// skips synchronizing site plan if logged in with WPOrg credentials |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be worth mentioning why? is it because the site plan is for WPCOM users only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the site plan API is a Dotcom endpoint and we cannot handle this request for WPOrg-authenticated users. I updated the comment in 419896c.
| if case let .failure(error) = result { | ||
| errors.append(error) | ||
| /// skips synchronizing site plan if logged in with WPOrg credentials | ||
| if siteID != WooConstants.placeholderStoreID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to check this with isAuthenticatedWithoutWPCom?
| var isAuthenticatedWithoutWPCom: Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - also updated in 419896c.
Generated by 🚫 dangerJS |
Closes: #8637
Description
This PR updates the site settings mapper and enables REST API for site settings endpoints.
Testing instructions
Pre-requisite: due to a rate-limit issue with Pressable sites, create a JN site to ensure that testing is smooth for now.
applicationPasswordAuthenticationForSiteCredentialLoginand build the app.🎛 Site settings sync completed for siteIDand not⛔️ Site settings sync had <count> error(s) for siteID.Testing setting loading and updating.
Screenshots
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-01-16.at.12.54.26.mp4
RELEASE-NOTES.txtif necessary.